package com.dubbo.comsumer;

import com.dubbo.api.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Consumer {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("consumer.xml");
        ((ClassPathXmlApplicationContext) ac).start();//启动消费者测试项目

        System.out.print("Consumer Start......");
        UserService Us = ac.getBean(UserService.class);  //为什么这样调用还不懂？
        System.out.print("consumer"+'\n');
        System.out.print(Us.getUserInfo(1));
    }
}
